home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / network / mail / pathalia.zoo / src / config.h < prev    next >
C/C++ Source or Header  |  1991-01-12  |  3KB  |  89 lines

  1. /* pathalias -- by steve bellovin, as told to peter honeyman */
  2.  
  3. /**************************************************************************
  4.  * +--------------------------------------------------------------------+ *
  5.  * |                    begin configuration section                     | *
  6.  * +--------------------------------------------------------------------+ *
  7.  **************************************************************************/
  8.  
  9. #define    STRCHR        /* have strchr -- system v and many others */
  10.  
  11. #undef    UNAME        /* have uname() -- probably system v or 8th ed. */
  12. #define    MEMSET        /* have memset() -- probably system v or 8th ed. */
  13.  
  14. #undef    GETHOSTNAME    /* have gethostname() -- probably bsd */
  15. #undef    BZERO        /* have bzero() -- probably bsd */
  16. #define MYSITE "mysite"    /* for really dumb machines (no GETHOSTNAME, no
  17.                UNAME) change mysite to your machine name */
  18.  
  19. /* default place for dbm output of makedb (or use -o at run-time) */
  20. #define    ALIASDB    "/usr/local/lib/palias"
  21.  
  22. /**************************************************************************
  23.  * +--------------------------------------------------------------------+ *
  24.  * |                    end of configuration section                    | *
  25.  * +--------------------------------------------------------------------+ *
  26.  **************************************************************************/
  27.  
  28.  
  29.  
  30. #ifdef MAIN
  31. #ifndef lint
  32. static char    *c_sccsid = "@(#)config.h    9.2 89/03/03";
  33. #endif /*lint*/
  34. #endif /*MAIN*/
  35.  
  36. /*
  37.  * malloc/free fine tuned for pathalias.
  38.  *
  39.  * MYMALLOC should work everwhere, so it's not a configuration
  40.  * option (anymore).  nonetheless, if you're getting strange
  41.  * core dumps (or panics!), comment out the following manifest,
  42.  * and use the inferior C library malloc/free.
  43.  */
  44. #define MYMALLOC    /**/
  45.  
  46. #ifdef MYMALLOC
  47. #define malloc mymalloc
  48. #define calloc(n, s) malloc ((n)*(s))
  49. #define free(s)
  50. #define cfree(s)
  51. extern char *memget();
  52. #else /* !MYMALLOC */
  53. extern char *calloc();
  54. #endif /* MYMALLOC */
  55.  
  56. #ifdef STRCHR
  57. #define index strchr
  58. #define rindex strrchr
  59. #else
  60. #define strchr index
  61. #define strrchr rindex
  62. #endif
  63.  
  64. #ifdef BZERO
  65. #define strclear(s, n)    ((void) bzero((s), (n)))
  66. #else /*!BZERO*/
  67.  
  68. #ifdef MEMSET
  69. extern char    *memset();
  70. #define strclear(s, n)    ((void) memset((s), 0, (n)))
  71. #else /*!MEMSET*/
  72. extern void    strclear();
  73. #endif /*MEMSET*/
  74.  
  75. #endif /*BZERO*/
  76.  
  77. extern char    *malloc();
  78. extern char    *strcpy(), *index(), *rindex();
  79.  
  80. #ifndef STATIC
  81.  
  82. #ifdef DEBUG
  83. #define STATIC extern
  84. #else /*DEBUG*/
  85. #define STATIC static
  86. #endif /*DEBUG*/
  87.  
  88. #endif /*STATIC*/
  89.